﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Demo
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                Data.DataCommon.SqlString = Data.DataCommon.CreateSqlString(textBox1.Text, "master", textBox2.Text, textBox3.Text, false);
                //Data.DataCommon.SqlConnection1
                string[] si = Data.DataGrasp.Get_GraspcwZt();
                for (int n = 0; n < si.Length; n++)
                {
                    comboBox1.Items.Add(si[n]);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            MessageBox.Show("当前帐套对应数据库名称为[" + Data.DataGrasp.Get_GraspcwZtData(comboBox1.SelectedItem.ToString()) + "]");
        }
    }
}
